package com.atguigu.tingshu.demo.repository;

import com.atguigu.tingshu.demo.entity.Person;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
*@Author：yyj
*@Package：com.atguigu.tingshu.demo.repository
*@Project：tingshu_parent240829
*@name：PersonRepository
*@Date：2025/1/17  21:04
*@Filename：PersonRepository
 **/
@Repository
public interface PersonRepository extends CrudRepository<Person,Long>{
    // 查询person库下的名字叫张三的文档id
    public List<Person> findPersonByName(String name);

    // 查询person库下的名字叫张三且地址包含昌平区
    public List<Person> findPersonByNameAndAddressContains(String name, String address);
}